<template>
  <div>
      <van-field label="名称" placeholder="请输入名称" v-model="form.name"/>
      <van-field label="资源地址" placeholder="请输入资源地址" v-model="form.url"/>
      <van-button @click="add">添加</van-button>
  </div>
</template>

<script>
export default {
    data(){
        return{
            form:{}
        }
    },
    methods:{
        add(){
            this.axios.post('resourceM',this.form).then(res=>{
                if(res.data.code == 200){
                    alert('添加成功')
                    this.form = {}
                }
            })
        }
    }
}
</script>

<style>

</style>